//control function to board beeper
void beeper(int16 duration, int8 count)
{
    while(count --) {
        buzz = 0;
        delay_ms(duration);
        buzz = 1; //stop buzzer
        delay_ms(25);
    }
}

